package com.fengmi.goods.mapper;

import com.fengmi.goods.entity.MallGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhuxm
 * @since 2022-03-02
 */
public interface MallGoodsMapper extends BaseMapper<MallGoods> {



    @Select("SELECT * FROM mall_goods\n" +
            "WHERE mall_goods.category3_id =#{catId}\n" +
            "ORDER BY hot DESC LIMIT 0,#{topn}")
    public List<MallGoods> findHotGoodsByCatId(String catId, Integer topn);




    public List<MallGoods> findGoodsHasAuditedForEs();
}
